/*
 * @Descripttion: 
 * @version: 
 * @Author: lsy
 * @Date: 2022-01-25 15:04:40
 * @LastEditors: lsy
 * @LastEditTime: 2022-01-27 14:45:22
 */
import { createRouter, createWebHistory } from "vue-router"

import AppMain from "@/views/AppMain"
import Home from "@/views/home"
import Page1 from "@/views/page1"

const base = require('./../../package.json').name;

const Router = createRouter({
    history: createWebHistory(`/${base}`),
    isAddDynamicMenuRoutes: false,  // 是否已经添加动态(菜单)路由
    routes: [
        {
            path: "/",
            name: "AppMain",
            component: AppMain,
            redirect: { path: "/home" },
            children: [
                {
                    path: "/home",
                    name: "Home",
                    component: Home
                },
                {
                    path: "/page1",
                    name: "Page1",
                    component: Page1
                }
            ]
        }
    ]
})

export default Router